Some vendor compilers can't compile non-constant elements of compound struct initializers
authorMartin Nordholts <martinn@src.gnome.org>
Wed, 25 Mar 2009 19:02:31 +0000 (19:02 +0000)
committerMartin Nordholts <martinn@src.gnome.org>
Wed, 25 Mar 2009 19:02:31 +0000 (19:02 +0000)
Patch from Gary V. Vaughan

svn path=/trunk/; revision=399

ChangeLog
babl/babl-fish.c

index d144a39bab1431a8167f9f0f9673b33f8342e914..7aae42c0272e17a3b5dec813200a0e45388614c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-25  Martin Nordholts  <martinn@svn.gnome.org>
+
+       * babl/babl-fish.c: Patch from Gary V. Vaughan. Some vendor
+       compilers can't compile non-constant elements of compound struct
+       initializers
+
 2009-03-25  Martin Nordholts  <martinn@svn.gnome.org>
 
        Patch from Gary V. Vaughan. Some vendor C compilers choke on C++
index c446e36cf6643d5393eb686f2fba7f96d6d3568d..0ab048c48a86fc5faabe5ca7ad984bf65ba52e4f 100644 (file)
@@ -193,8 +193,14 @@ babl_fish (const void *source,
                             (Babl *) NULL,
                             (Babl *) NULL,
                             0,
-                            source_format,
-                            destination_format};
+                            (Babl *) NULL,
+                            (Babl *) NULL};
+
+    /* some vendor compilers can't compile non-constant elements of
+     * compound struct initializers
+     */
+    ffish.source = source_format;
+    ffish.destination = destination_format;
 
     id_htable = (babl_fish_db ())->id_hash;
     hashval = babl_hash_by_int (id_htable, babl_fish_get_id (source_format, destination_format));